﻿<phone:PhoneApplicationPage 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:local="clr-namespace:Nok_Air"
	xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
	xmlns:Nok_Air_WS="clr-namespace:Nok_Air.WebService"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
	x:Class="Nok_Air.SelectPassengerPage"
	Orientation="Portrait" FontFamily="/Nok Air;component/Fonts/Fonts.zip#PSL Display" FontSize="40">

    <phone:PhoneApplicationPage.Resources>
        <Style x:Key="seatToggleButtonStyle" TargetType="ToggleButton">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="ToggleButton">
                        <Grid x:Name="Document" Height="60" UseLayoutRounding="False" Width="60">
                            <VisualStateManager.CustomVisualStateManager>
                                <ic:ExtendedVisualStateManager/>
                            </VisualStateManager.CustomVisualStateManager>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CheckStates">
                                    <VisualState x:Name="Checked">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="textBlock">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Unchecked">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="Sel">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Indeterminate"/>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="grid">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="MouseOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="grid">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="Group_8">
                                                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                                                <EasingDoubleKeyFrame KeyTime="0:0:1" Value="1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="grid">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="textBlock">
                                                <DiscreteObjectKeyFrame KeyTime="0">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Visibility>Collapsed</Visibility>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Unfocused"/>
                                    <VisualState x:Name="Focused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Grid>
                                <Image x:Name="Image" Source="/CheckIn/icons_Files/image0.png" Stretch="Fill"/>
                                <Grid x:Name="Sel" Margin="8.5,8.25,3.245,4.604">
                                    <Canvas x:Name="Face" Margin="0,0,8.571,12.813">
                                        <Canvas x:Name="Group_1" Width="39.684" Height="34.3331" Canvas.Left="0" Canvas.Top="0">
                                            <Path x:Name="Path" Width="39.684" Height="34.3331" Canvas.Left="0" Canvas.Top="0" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF0D4201" Data="F1 M 19.842,0.5C 30.5242,0.5 39.184,7.96194 39.184,17.1665C 39.184,26.3712 30.5244,33.8331 19.842,33.8331C 9.1597,33.8331 0.5,26.3712 0.5,17.1665C 0.5,7.96194 9.15979,0.5 19.842,0.5 Z ">
                                                <Path.Fill>
                                                    <RadialGradientBrush RadiusX="0.828573" RadiusY="0.828572" Center="0.487333,0.171429" GradientOrigin="0.487333,0.171429">
                                                        <RadialGradientBrush.RelativeTransform>
                                                            <TransformGroup>
                                                                <RotateTransform CenterX="0.487333" CenterY="0.171429" Angle="90"/>
                                                            </TransformGroup>
                                                        </RadialGradientBrush.RelativeTransform>
                                                        <GradientStop Color="#FF92FE44" Offset="0.118644"/>
                                                        <GradientStop Color="#FF83F034" Offset="0.177966"/>
                                                        <GradientStop Color="#FF74E325" Offset="0.572034"/>
                                                        <GradientStop Color="#FF428910" Offset="0.860169"/>
                                                        <GradientStop Color="#FF53AC15" Offset="1"/>
                                                    </RadialGradientBrush>
                                                </Path.Fill>
                                            </Path>
                                            <Ellipse x:Name="Ellipse_2" Width="29.9455" Height="19.5238" Canvas.Left="4.81772" Canvas.Top="0.976135" Stretch="Fill">
                                                <Ellipse.Fill>
                                                    <RadialGradientBrush RadiusX="0.535716" RadiusY="0.535713" Center="0.499993,0.0714258" GradientOrigin="0.499993,0.0714258">
                                                        <RadialGradientBrush.RelativeTransform>
                                                            <TransformGroup/>
                                                        </RadialGradientBrush.RelativeTransform>
                                                        <GradientStop Color="#C6FFFFFF" Offset="0"/>
                                                        <GradientStop Color="#64FFFFFF" Offset="0.559322"/>
                                                        <GradientStop Color="#00FFFFFF" Offset="1"/>
                                                    </RadialGradientBrush>
                                                </Ellipse.Fill>
                                            </Ellipse>
                                            <Path x:Name="Path_3" Width="8.73682" Height="7.66663" Canvas.Left="25.421" Canvas.Top="13.3332" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF589E26" Fill="#FF000000" Data="F1 M 29.7894,13.8332C 31.9259,13.8332 33.6578,15.3255 33.6578,17.1665C 33.6578,19.0074 31.9258,20.4998 29.7894,20.4998C 27.653,20.4998 25.921,19.0074 25.921,17.1665C 25.921,15.3255 27.6529,13.8332 29.7894,13.8332 Z "/>
                                            <Path x:Name="Path_4" Width="8.73682" Height="7.66663" Canvas.Left="4.42123" Canvas.Top="13.3332" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF589E26" Fill="#FF000000" Data="F1 M 8.78964,13.8332C 10.9261,13.8332 12.6581,15.3255 12.6581,17.1665C 12.6581,19.0074 10.9261,20.4998 8.78964,20.4998C 6.6532,20.4998 4.92123,19.0074 4.92123,17.1665C 4.92123,15.3255 6.65311,13.8332 8.78964,13.8332 Z "/>
                                            <Path x:Name="Path_5" Width="3.3158" Height="2.85712" Canvas.Left="27.0264" Canvas.Top="14.7853" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M 28.6843,14.7853C 29.6,14.7853 30.3422,15.4248 30.3422,16.2139C 30.3422,17.0028 29.5999,17.6424 28.6843,17.6424C 27.7687,17.6424 27.0264,17.0028 27.0264,16.2139C 27.0264,15.4248 27.7686,14.7853 28.6843,14.7853 Z "/>
                                            <Path x:Name="Path_6" Width="3.3158" Height="2.85712" Canvas.Left="6.02646" Canvas.Top="14.7854" Stretch="Fill" Fill="#FFFFFFFF" Data="F1 M 7.68433,14.7854C 8.60007,14.7854 9.34225,15.425 9.34225,16.214C 9.34225,17.0029 8.59988,17.6425 7.68433,17.6425C 6.7688,17.6425 6.02646,17.0029 6.02646,16.214C 6.02646,15.425 6.76865,14.7854 7.68433,14.7854 Z "/>
                                        </Canvas>
                                        <Path x:Name="Path_7" Width="10.0632" Height="4.80945" Canvas.Left="14.3684" Canvas.Top="22.857" Stretch="Fill" StrokeStartLineCap="Round" StrokeEndLineCap="Round" StrokeLineJoin="Bevel" Stroke="#FF237510" Fill="#FFB2B2B2" Data="F1 M 14.8684,23.357L 23.9316,23.357C 23.9316,23.357 23.3984,27.1665 19.1867,27.1665C 15.4015,27.1664 14.8684,23.357 14.8684,23.357 Z "/>
                                    </Canvas>
                                    <Canvas x:Name="Group_8" Margin="16.755,23.396,0,0">
                                        <Path x:Name="Path_9" Width="28.837" Height="21.6279" Canvas.Left="2.66293" Canvas.Top="2.12207" Stretch="Fill" Data="F1 M 17.0815,2.12207C 25.0446,2.12207 31.5,6.96362 31.5,12.936C 31.5,18.9084 25.0445,23.7499 17.0815,23.7499C 9.11832,23.7499 2.66293,18.9084 2.66293,12.936C 2.66293,6.96362 9.11826,2.12207 17.0815,2.12207 Z ">
                                            <Path.Fill>
                                                <RadialGradientBrush RadiusX="0.5" RadiusY="0.500001" Center="0.499998,0.500001" GradientOrigin="0.499998,0.500001">
                                                    <RadialGradientBrush.RelativeTransform>
                                                        <TransformGroup/>
                                                    </RadialGradientBrush.RelativeTransform>
                                                    <GradientStop Color="#00000000" Offset="0.529661"/>
                                                    <GradientStop Color="#58000000" Offset="0.669492"/>
                                                    <GradientStop Color="#58000000" Offset="0.864407"/>
                                                    <GradientStop Color="#2D000000" Offset="0.933403"/>
                                                    <GradientStop Color="#00000000" Offset="1"/>
                                                </RadialGradientBrush>
                                            </Path.Fill>
                                        </Path>
                                        <Canvas x:Name="Group_10" Width="29.837" Height="22.6279" Canvas.Left="0" Canvas.Top="0">
                                            <Path x:Name="Path_11" Width="15.1389" Height="9.72919" Canvas.Left="9.03287" Canvas.Top="8.39587" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF5B1717" Fill="#FFD9D7CD" Data="F1 M 10.0329,14.7328L 13.6717,17.6251L 23.6717,12.3334L 21.0832,8.89587L 14.005,14.3438L 12.2238,12.0001L 11.953,11.8542L 11.5155,11.8751L 9.89395,13.1288L 9.60678,13.5175L 9.53287,13.9411L 9.74466,14.448L 11.3384,15.8021"/>
                                            <Path x:Name="Path_12" Width="20.2247" Height="15.4186" Canvas.Left="6.40817" Canvas.Top="4.80615" Stretch="Fill" StrokeStartLineCap="Round" StrokeEndLineCap="Round" StrokeLineJoin="Round" Stroke="#FF000000" Fill="#4DFAFAFA" Data="F1 M 16.5205,5.30615C 21.8293,5.30615 26.1328,8.53387 26.1328,12.5154C 26.1328,16.4971 21.8293,19.7247 16.5205,19.7247C 11.2118,19.7247 6.90817,16.4971 6.90817,12.5154C 6.90817,8.53387 11.2118,5.30615 16.5205,5.30615 Z "/>
                                            <Path x:Name="Path_13" Width="29.837" Height="22.6278" Canvas.Left="0" Canvas.Top="0" Stretch="Fill" StrokeLineJoin="Round" Stroke="#FF5B1717" Data="F1 M 16.5205,2.90308C 23.5989,2.90308 29.337,7.20673 29.337,12.5154C 29.337,17.8242 23.5989,22.1278 16.5205,22.1278C 9.44223,22.1278 3.70413,17.8242 3.70413,12.5154C 3.70413,9.86108 3.70413,5.30615 0.5,0.5C 6.90823,2.90308 12.9814,2.90308 16.5205,2.90308 Z M 16.5205,5.30621C 11.2118,5.30621 6.90817,8.53387 6.90817,12.5155C 6.90817,16.4971 11.2118,19.7248 16.5205,19.7248C 21.8293,19.7248 26.1328,16.4971 26.1328,12.5155C 26.1328,8.53387 21.8293,5.30621 16.5205,5.30621 Z ">
                                                <Path.Fill>
                                                    <LinearGradientBrush StartPoint="0.557745,-0.00118527" EndPoint="0.557745,0.998815">
                                                        <GradientStop Color="#FFD1D1D1" Offset="0"/>
                                                        <GradientStop Color="#FFA8AAB9" Offset="0.773054"/>
                                                        <GradientStop Color="#FF8084A2" Offset="0.991525"/>
                                                    </LinearGradientBrush>
                                                </Path.Fill>
                                            </Path>
                                            <Path x:Name="Path_14" Width="28.837" Height="18.1298" Canvas.Left="0.499969" Canvas.Top="0.5" Stretch="Fill" Data="F1 M 16.5205,2.90308C 23.5988,2.90308 29.3369,7.20673 29.3369,12.5154C 26.7737,10.1124 13.3164,9.63177 6.63071,18.6298C 4.8024,16.9683 3.70407,14.8381 3.70407,12.5154C 3.70407,9.86108 3.70407,5.30621 0.499969,0.5C 6.90823,2.90308 12.9814,2.90308 16.5205,2.90308 Z ">
                                                <Path.Fill>
                                                    <LinearGradientBrush StartPoint="0.600339,0.663539" EndPoint="1.52369,0.663539">
                                                        <LinearGradientBrush.RelativeTransform>
                                                            <TransformGroup>
                                                                <SkewTransform CenterX="0.600339" CenterY="0.663539" AngleX="10.0283" AngleY="0"/>
                                                                <RotateTransform CenterX="0.600339" CenterY="0.663539" Angle="232.142"/>
                                                            </TransformGroup>
                                                        </LinearGradientBrush.RelativeTransform>
                                                        <GradientStop Color="#65FFFFFF" Offset="0"/>
                                                        <GradientStop Color="#33FFFFFF" Offset="0.521976"/>
                                                        <GradientStop Color="#00FFFFFF" Offset="0.669492"/>
                                                    </LinearGradientBrush>
                                                </Path.Fill>
                                            </Path>
                                        </Canvas>
                                        <Path x:Name="Path_15" Width="18.7164" Height="14.0374" Canvas.Left="0.5" Canvas.Top="0.499939" Stretch="Fill" Data="F1 M 3.56375,7.12347C 3.38364,4.8255 1.9418,1.58136 0.5,0.499939C 2.66275,1.58136 6.26736,2.66278 9.33127,2.79779C 16.1995,7.94897 20.4762,13.0932 18.8836,14.2877C 17.2909,15.4822 10.432,12.2747 3.56375,7.12347 Z ">
                                            <Path.Fill>
                                                <RadialGradientBrush RadiusX="0.93967" RadiusY="0.217899" Center="0.317772,0.317772" GradientOrigin="0.317772,0.317772">
                                                    <RadialGradientBrush.RelativeTransform>
                                                        <TransformGroup>
                                                            <RotateTransform CenterX="0.317772" CenterY="0.317772" Angle="225"/>
                                                        </TransformGroup>
                                                    </RadialGradientBrush.RelativeTransform>
                                                    <GradientStop Color="#58FDFFE6" Offset="0"/>
                                                    <GradientStop Color="#2DFCE2A1" Offset="0.459258"/>
                                                    <GradientStop Color="#00FCC65C" Offset="0.902542"/>
                                                </RadialGradientBrush>
                                            </Path.Fill>
                                        </Path>
                                    </Canvas>
                                </Grid>
                            </Grid>
                            <ContentPresenter x:Name="contentPresenter" d:LayoutOverrides="Width, Height">
                                <Grid HorizontalAlignment="Center" VerticalAlignment="Center">
                                    <Grid x:Name="grid" HorizontalAlignment="Center" VerticalAlignment="Center" Width="35" Height="35">
                                        <Grid.Background>
                                            <ImageBrush ImageSource="/CheckIn/icons_Files/cross.png"/>
                                        </Grid.Background>
                                    </Grid>
                                    <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="35" Height="35">
                                        <TextBlock x:Name="textBlock" Text="{TemplateBinding Content}" Foreground="White" FontSize="29.333" FontWeight="Bold" d:LayoutOverrides="Width, Height" HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                    </Grid>
                                </Grid>
                            </ContentPresenter>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

    </phone:PhoneApplicationPage.Resources>

    <phone:PhoneApplicationPage.Foreground>
        <StaticResource ResourceKey="PhoneForegroundBrush"/>
    </phone:PhoneApplicationPage.Foreground>

    <Grid x:Name="LayoutRoot" Background="Transparent" d:DataContext="{d:DesignData /SampleData/MainViewModelSampleData.xaml}">
        <Grid.Resources>
            <local:NameSeparateConverter x:Name="NameSeparateConverter"/>
            <local:SellingClsCodeConverter x:Name="SellingClsCodeConverter"/>
            <local:SeatStatusConverter x:Name="SeatStatusConverter"/>
            <local:CheckinStatusConverter x:Name="CheckinStatusConverter"/>
            <local:CheckinStatusColorConverter x:Name="CheckinStatusColorConverter"/>
            <DataTemplate x:Key="passengerTemplate">
                <StackPanel Margin="0,0,0,15">
                    <Border BorderThickness="3" CornerRadius="5" Background="White" BorderBrush="#FF818181" Width="460" HorizontalAlignment="Center" VerticalAlignment="Top">
                        <StackPanel Margin="10,10,10,5">
                            <TextBlock Text="{Binding Name, Converter={StaticResource NameSeparateConverter}}" FontSize="48" Foreground="Black" FontFamily="/Nok Air;component/Fonts/Fonts.zip#PSL Display"/>
                            <Grid Margin="0,0,0,10">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="3*"/>
                                    <ColumnDefinition Width="2*"/>
                                </Grid.ColumnDefinitions>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="1*"/>
                                        <ColumnDefinition Width="1.5*"/>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding Class}" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="32" TextWrapping="Wrap" Foreground="Black" FontFamily="/Nok Air;component/Fonts/Fonts.zip#PSL Display"/>
                                    <TextBlock Grid.Column="1" Text="{Binding ClassCode, Converter={StaticResource SellingClsCodeConverter}}" Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="32" TextWrapping="Wrap" Foreground="Black" FontFamily="/Nok Air;component/Fonts/Fonts.zip#PSL Display"/>
                                </Grid>
                                <Grid Grid.Column="1">
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="1*"/>
                                        <ColumnDefinition Width="1.3*"/>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Text="{Binding SeatNoStr}" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="32" TextWrapping="Wrap" Foreground="Black" FontFamily="/Nok Air;component/Fonts/Fonts.zip#PSL Display"/>
                                    <Border Grid.Column="1" Background="#FF818181" Margin="5,0,0,0" BorderThickness="1" BorderBrush="#99000000"/>
                                    <TextBlock Grid.Column="1" Text="{Binding SeatNo, Mode=TwoWay}" x:Name="numberTextBox" Tag="{Binding CheckInStatus}" VerticalAlignment="Center" MouseLeftButtonDown="numberTextBox_MouseLeftButtonDown" Height="45" Margin="0" TextAlignment="Center" FontFamily="/Nok Air;component/Fonts/Fonts.zip#PSL Display" FontSize="32"/>
                                </Grid>
                            </Grid>
                            <Border Margin="0" CornerRadius="2" Background="{Binding CheckInStatus, Converter={StaticResource CheckinStatusColorConverter}}" VerticalAlignment="Top">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="1*"/>
                                        <ColumnDefinition Width="3*"/>
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Grid.Column="0" Margin="15" Text="{Binding StatusStr}" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="32" TextWrapping="Wrap" Foreground="Black" FontFamily="/Nok Air;component/Fonts/Fonts.zip#PSL Display"/>
                                    <TextBlock Grid.Column="1" Text="{Binding CheckInStatus, Converter={StaticResource CheckinStatusConverter}}" Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="32" TextWrapping="Wrap" Foreground="Black" FontFamily="/Nok Air;component/Fonts/Fonts.zip#PSL Display"/>
                                </Grid>
                            </Border>
                        </StackPanel>
                    </Border>
                </StackPanel>
            </DataTemplate>
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition Height="70"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="80"/>
        </Grid.RowDefinitions>
        <Grid Style="{StaticResource TopAppBarStyle}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition  Width="1*"/>
                <ColumnDefinition  Width="2*"/>
                <ColumnDefinition  Width="1*"/>
            </Grid.ColumnDefinitions>
            <Button x:Name="backButton" Content="Back" HorizontalAlignment="Left"  Width="130" Margin="15,0,0,0" Height="60" Style="{StaticResource BackButtonStyle}" Visibility="Collapsed" />
            <TextBlock x:Name="Title_selectSeat_TextBlock" Margin="0" TextWrapping="Wrap" Text="{Binding SelSeatTitle}" FontSize="48" TextAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" Grid.Column="1"/>
            <Button x:Name="doneButton" Content="{Binding CheckinTitle}" Style="{StaticResource BlueButtonStyle}" Margin="5,0" Click="doneButton_Click" Foreground="White" Grid.Column="2" FontSize="40" VerticalAlignment="Center"/>
        </Grid>
        <Grid Style="{StaticResource ContentStyle}" Margin="0">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <TextBlock Margin="20,20,0,0" TextWrapping="Wrap" VerticalAlignment="Top" HorizontalAlignment="Left" FontSize="48" Foreground="#FF0A0202" Text="{Binding SelSeatMsg}"/>
            <ListBox x:Name="PassengerListBox" Margin="10,0,10,10" FontSize="32" Width="Auto" SelectionChanged="PassengerListBox_SelectionChanged" Grid.Row="1">
                <ListBox.ItemTemplate>
                    <StaticResource ResourceKey="passengerTemplate"/>
                </ListBox.ItemTemplate>
            </ListBox>
        </Grid>
        <Grid Grid.Row="2">
            <local:AppBarMenuUserControl/>
        </Grid>
        <StackPanel x:Name="SeatList"  Margin="10,-24,10,10" Grid.Row="1" Visibility="Collapsed">
            <StackPanel.Background>
                <ImageBrush ImageSource="/Images/Background/passengerSeatBG.png" Stretch="Fill"/>
            </StackPanel.Background>
            <Grid Margin="30,50,30,32" VerticalAlignment="Top">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
                <Button Grid.Column="0" x:Name="ClearSeatBT" Content="{Binding Claer}" BorderBrush="{x:Null}" BorderThickness="0" Style="{StaticResource BlueButtonStyle}" Foreground="White" Click="ClearSeatBT_Click" HorizontalAlignment="Left" Margin="0" VerticalAlignment="Center" Width="110"/>
                <Button Grid.Column="1" x:Name="DoneSeatBT" Content="{Binding OK}" BorderBrush="{x:Null}" BorderThickness="0" Style="{StaticResource BlueButtonStyle}" Foreground="White" Click="DoneSeatBT_Click" HorizontalAlignment="Right" VerticalAlignment="Center" Width="110"/>

            </Grid>
            <ListBox ItemsSource="{Binding GetSeatsResult.SeatGroup}" Margin="10,0,10,0" Background="{x:Null}" Height="493" HorizontalAlignment="Center" HorizontalContentAlignment="Center">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Grid Tag="{Binding Row}">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="200"/>
                                <ColumnDefinition Width="40"/>
                                <ColumnDefinition Width="200"/>
                            </Grid.ColumnDefinitions>
                            <ItemsControl Grid.Column="0" ItemsSource="{Binding RightSide}">
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <StackPanel Margin="0,0,3,0">
                                            <ToggleButton Tag="{Binding NumbericNo}" Content="{Binding CharNo}" Style="{StaticResource seatToggleButtonStyle}"  Click="SelSeat_Click" HorizontalAlignment="Left" IsEnabled="{Binding Status, Converter={StaticResource SeatStatusConverter}}"/>
                                        </StackPanel>
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                                <ItemsControl.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right"/>
                                    </ItemsPanelTemplate>
                                </ItemsControl.ItemsPanel>
                            </ItemsControl>
                            <TextBlock Grid.Column="1" Text="{Binding Row}" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Bold" Foreground="#FF0C0606" FontSize="29.333"/>
                            <ItemsControl Grid.Column="2" ItemsSource="{Binding LeftSide}">
                                <ItemsControl.ItemTemplate>
                                    <DataTemplate>
                                        <StackPanel Margin="3,0,0,0">
                                            <ToggleButton Tag="{Binding NumbericNo}" Content="{Binding CharNo}" Style="{StaticResource seatToggleButtonStyle}"  Click="SelSeat_Click" HorizontalAlignment="Left" IsEnabled="{Binding Status, Converter={StaticResource SeatStatusConverter}}"/>
                                        </StackPanel>
                                    </DataTemplate>
                                </ItemsControl.ItemTemplate>
                                <ItemsControl.ItemsPanel>
                                    <ItemsPanelTemplate>
                                        <StackPanel Orientation="Horizontal" HorizontalAlignment="Left"/>
                                    </ItemsPanelTemplate>
                                </ItemsControl.ItemsPanel>
                            </ItemsControl>
                        </Grid>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
        </StackPanel>
    </Grid>
</phone:PhoneApplicationPage>
